package org.an.proj.contacts.util;

import android.view.View;

/**
 * Created by an on 2017/1/13.<br/>
 */

public class VisibleUtil {
  /**
   * 不考虑inVisible
   */
  public static boolean isVisible(View view) {
    return view.getVisibility() == View.VISIBLE;
  }

  public static void visible(View view) {
    view.setVisibility(View.VISIBLE);
  }

  public static void gone(View view) {
    view.setVisibility(View.GONE);
  }

  public static void invisible(View view) {
    view.setVisibility(View.INVISIBLE);
  }

  public static void show(boolean isShow){

  }

  /**
   * 不考虑inVisible
   */
  public static void toggleVisible(View view) {
    if (view.getVisibility() == View.VISIBLE) {
      view.setVisibility(View.GONE);
    } else {
      view.setVisibility(View.VISIBLE);
    }
  }
}
